namespace AceMobile.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class orderlist : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.OrderLists",
                c => new
                    {
                        ID = c.Int(nullable: false, identity: true),
                        ProductID = c.Int(nullable: false),
                        ProductType = c.String(),
                        UserID = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.ID)
                .ForeignKey("dbo.Accounts", t => t.UserID, cascadeDelete: true)
                .Index(t => t.UserID);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.OrderLists", new[] { "UserID" });
            DropForeignKey("dbo.OrderLists", "UserID", "dbo.Accounts");
            DropTable("dbo.OrderLists");
        }
    }
}
